home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 12 / BBS in a box XII-1.iso / Files / Bus / S / S7P 3.6 Manual.sit / S7P 3.6 Manual.rsrc / TEXT_131.txt < prev    next >
Encoding:
Text File  |  1993-11-14  |  3.6 KB  |  87 lines

  1. BringToFront
  2.  
  3. Err:=BringToFront(Signature)
  4.  
  5. Brings the application specified by a 4-character signature to the front. The application must already be running. This only requests that the application be brought to the front. It won‚Äôt actually happen until 4D¬Æ gives up CPU time by calling WaitNextEvent. In pre-3.0 versions of 4D¬Æ, you may have to call ProcessAEVT to force it to happen.
  6.  
  7. FindAppName
  8.  
  9. Err:=FindAppName(Signature;Name)
  10.  
  11. Given a 4-character signature, this will return the name of the application associated with that ID. It will return the name without a full path.
  12.  
  13. FindCreator
  14.  
  15. Err:=FindCreator(File Name;Creator ID)
  16.  
  17. Given a full or partial pathname of a file, will return the creator ID. This is useful to figure out which application to launch when any document is selected.
  18.  
  19. Example:
  20.  
  21. _________________________________________________________________
  22.  Set Channel(10;"")
  23.  if (OK = 1)
  24.      Set Channel(11)
  25.      $err := FindCreator(Document;$creator)
  26.      if ($err = 0)
  27.          $err := Launch($creator;Document)
  28.      end if
  29.  end if
  30. _________________________________________________________________
  31.  
  32. IsRunning
  33.  
  34. Result:=IsRunning(Creator ID)
  35.  
  36. Returns 1 if the application is running, 0 otherwise.
  37.  
  38. Long
  39.  
  40. Result:=Long(TypeString)
  41.  
  42. Converts a 4-character type string to a long integer value. This is useful when a type or application signature needs to be passed to one of the low-level functions. 
  43.  
  44. ProcessList
  45.  
  46. Err:=ProcessList(Visible;StringArray)
  47.  
  48. Builds an array of the signatures of all running processes. If 'visible' is non-zero, only the visible applications will be listed. Otherwise, the list will also include invisible processes, such as background-only applications and File Sharing Extension. The array will be allocated if necessary and will contain a 4-character signature string for each running (or visible) application. In a compiled database, you must pre-define the array as fixed 4-character strings, although the number of elements will change dynamically.
  49.  
  50. Example:
  51. _________________________________________________________________
  52.  If (Before)
  53.    $err:=ProcessList (0;ProcList)
  54.    If ($err=0)
  55.      ARRAY STRING(64;ProcNames;Size of array(ProcList))
  56.      For ($i;1;Size of array(ProcList))
  57.        $err:=FindAppName (ProcList{$i};$pn)
  58.        ProcNames{$i}:=$pn
  59.      End for 
  60.    End if 
  61.  End if
  62. _________________________________________________________________
  63.  
  64. S7Version
  65.  
  66. Version:=S7Version(Serialization String)
  67.  
  68. Returns the serialization string and version # of System 7 Pack‚Ñ¢ as a long integer value, which will be negative for a demo version. The current version is 3.5, which will be returned as 350 (or -350 for the demo version).
  69.  
  70. SetTimeout
  71.  
  72. SetTimeout(Ticks)
  73.  
  74. Sets the time-out value in ticks (60ths of a second) to use when sending an AppleEvent. A good value to use is "600", which is 10 seconds. To specify the default value, which is about a minute, pass -1. If the value is too short, you may get an error code of -1712 (time out) when sending an AppleEvent. If the value is too long, the system will appear to "hang" while waiting for a response if none is returned.
  75.  
  76. System7
  77.  
  78. Result:=System7
  79.  
  80. Returns 1 if you're running a compatible system which supports AppleEvents. This should be one of the first calls in your program, so you can provide a graceful exit if necessary. Other System 7 Pack‚Ñ¢ functions will not crash if you're not running system 7, but will simply return an error code of -2.
  81.  
  82. IsVersion3
  83.  
  84. Result:=IsVersion3
  85.  
  86. Returns non-zero if you‚Äôre running 4D¬Æ v3.0 or later. NOTE: This replaces S7P 3.3‚Äôs ‚ÄúAE Process ID‚Äù. Since 4D 3.0.3 and later handle AppleEvents in a system process, we no longer provide direct access to it.
  87.